1. Technical Field
This application generally relates to syntax modeling, and more particularly to techniques used for generating code to perform parsing of an input in accordance with a syntax.
2. Description of Related Art
Computer systems may include different resources used by one or more host processors. Resources and host processors in a computer system may be interconnected by one or more communication connections. These resources may include, for example, data storage devices such as those included in the data storage systems manufactured by EMC Corporation. These data storage systems may be coupled to one or more servers or host processors and provide storage services to each host processor. Multiple data storage systems from one or more different vendors may be connected and may provide common data storage for one or more host processors in a computer system.
A host processor may perform a variety of data processing tasks and operations using the data storage system. For example, a host processor may perform basic system I/O operations in connection with data requests, such as data read and write operations.
A host system including a host processor may store and retrieve data using a storage device containing a plurality of host interface units, disk drives, and disk interface units. The host systems access the storage device through a plurality of channels provided therewith. Host systems provide data and access control information through the channels to the storage device and the storage device provides data to the host systems also through the channels. The host systems do not address the disk drives of the storage device directly, but rather, access what appears to the host systems as a plurality of logical disk units. The logical disk units may or may not correspond to the actual disk drives. Allowing multiple host systems to access the single storage device unit allows the host systems to share data in the device. In order to facilitate sharing of the data on the device, additional software on the data storage systems may also be used.
In connection with management of a data storage system, commands may be issued using client software. The client software may be installed and executed on a host system which communicates with one or more data storage systems to issue commands to the one or more data storage systems. The commands may be entered via the client software using a command line interface (CLI). The commands may be, for example, to perform data configuration operations, obtain information regarding the status or current configuration, and the like. The client software may be used in connection with issuing commands to different data storage systems each having a different command line syntax or a different version of a supported command line syntax.
In connection with the data storage system commands, as well as more generally in connection with other inputs besides commands, an input may be processed to determine whether the input is validly formed in accordance with a syntax. Parsing, as performed by a parser, is the process of analyzing the input to determine whether the input can be generated in accordance with the syntax and, therefore, recognized as valid. As a result of parsing, such as of parsing commands, values of command parameters may be extracted from the input. The parsing may be performed using parser code produced by manually coding the parser. Rather than manually having a programmer write the parser code, a tool may be used to generate parser code. For example, tools, such as YACC (yet another compiler compiler) developed for use with the Unix operating system, may be used in connection with generating parser code. In order to use tools such as YACC, the grammar of the syntax may be required to be represented in a complex and formal form such as a rules written in Backus-Naur form (BNF). The process of representing the grammar in such a formal form may require an unacceptable amount of time, effort and/or knowledge. Representing the grammar rules in such a formal and complex representation may have drawbacks in that additional knowledge and experience may be necessary in order to formally express the grammar in the required form. Such knowledge may also be required in order to modify the formal representation, for example, in the event of a syntax change.